import type { R, TableDataInfo } from '@/api/model/resultModel';
import type { XhljActivityAgendaParticipantsForm, XhljActivityAgendaParticipantsQuery, XhljActivityAgendaParticipantsVo } from '@/api/xhlj/model/activityAgendaParticipantsModel';
import { request } from '@/utils/request';

// 查询参会人员议程安排列表
export function listActivityAgendaParticipants(query?: XhljActivityAgendaParticipantsQuery) {
  return request.get<TableDataInfo<XhljActivityAgendaParticipantsVo>>({
    url: '/xhlj/activityAgendaParticipants/list',
    params: query,
  });
}

// 查询参会人员议程安排详细
export function getActivityAgendaParticipants(activityAgendaParticipantId: number) {
  return request.get<R<XhljActivityAgendaParticipantsVo>>({
    url: `/xhlj/activityAgendaParticipants/${activityAgendaParticipantId}`,
  });
}

// 新增参会人员议程安排
export function addActivityAgendaParticipants(data: XhljActivityAgendaParticipantsForm) {
  return request.post<R<void>>({
    url: '/xhlj/activityAgendaParticipants',
    data,
  });
}

// 修改参会人员议程安排
export function updateActivityAgendaParticipants(data: XhljActivityAgendaParticipantsForm) {
  return request.put<R<void>>({
    url: '/xhlj/activityAgendaParticipants',
    data,
  });
}

// 删除参会人员议程安排
export function delActivityAgendaParticipants(activityAgendaParticipantIds: number | Array<number>) {
  return request.delete<R<void>>({
    url: `/xhlj/activityAgendaParticipants/${activityAgendaParticipantIds}`,
  });
}
